#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int reverse(int i)
{
	char ch[100] = { 0 };
	sprintf(ch, "%d", i);
	int len = strlen(ch);
	int left = 0;
	int right = len - 1;
	while (left < right)
	{
		char c = ch[left];
		ch[left] = ch[right];
		ch[right] = c;
		left++;
		right--;
	}
	sscanf(ch, "%d", &i);
	return i;
}
void reverse2(char* ch, int len)
{
	int left = 0;
	int right = len - 1;
	while (left < right)
	{
		char c = ch[left];
		ch[left] = ch[right];
		ch[right] = c;
		left++;
		right--;
	}
}
int main()
{
	char ch[100] = { 0 };
	scanf("%s", ch);
	int i = 0;
	int x = -1;
	while (ch[i])
	{
		if (ch[i] == '.')
		{
			x = 0;
			break;
		}
		if (ch[i] == '/')
		{
			x = 1;
			break;
		}
		if (ch[i] == '%')
		{
			x = 2;
			break;
		}
		i++;
	}
	if (x == -1)
	{
		reverse2(ch, strlen(ch));
		while (ch[0] == '0' && ch[1])
		{
			int j = 0;
			while (ch[j])
			{
				ch[j] = ch[j + 1];
				j++;
			}
		}
		printf("%s", ch);
	}
	else if (x != 2)
	{
		int a = 0;
		int b = 0;
		char c = 0;
		sscanf(ch, "%d%c%d", &a, &c, &b);
		printf("%d%c%d", reverse(a), c, reverse(b));
	}
	else
	{
		reverse2(ch, strlen(ch) - 1);
		while (ch[0] == '0' && ch[1] && ch[1] != '%')
		{
			int j = 0;
			while (ch[j])
			{
				ch[j] = ch[j + 1];
				j++;
			}
		}
		printf("%s", ch);
	}
	return 0;
}
